package com.shihb.esjddemo.config;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Description: Version:1.0.0
 *
 * @author shihb
 * @date 2020/4/16 12:55
 */


@Configuration
public class EsClientConfig {

  @Bean
  public RestHighLevelClient restHighLevelClient() {
    RestHighLevelClient client = new RestHighLevelClient(
        RestClient.builder(
            new HttpHost("127.0.0.1", 9922, "http")));
    return client;
  }


}
